import request from '@/utils/request'

export const getLectureForLevel = (params) => {
  return request({
    url: '/v1/departmentWork/lecture/level/',
    method: 'get',
    params,
  })
}

// 评定一个记录的效果
export const saveLectureLevel = (data) => {
  return request({
    url: '/v1/departmentWork/lecture/level/',
    method: 'put',
    data,
  })
}

// 添加一个记录
export const addMyLecture = async (data) => {
  return request({
    url: '/v1/departmentWork/lecture/my/',
    method: 'post',
    data,
  })
}

// 查询我的记录
export const getMyLecture = (params) => {
  return request({
    url: '/v1/departmentWork/lecture/my/',
    method: 'get',
    params,
  })
}

// 查询路演统计记录
export const getLectureStatistics = (params) => {
  return request({
    url: '/v1/departmentWork/lecture/statistics/',
    method: 'get',
    params,
  })
}

// 按月统计
export const sLectureMontyly = (params) => {
  return request({
    url: '/v1/departmentWork/lecture/statisticsMonthly/',
    method: 'get',
    params,
  })
}

// 管理刪除记录
export const DeleteWorkLecture = (rid) => {
  return request({
    url: '/v1/departmentWork/lecture/manage/',
    method: 'delete',
    params: { rid },
  })
}

export const SliceUploadFile = async (data) => {
  return request({
    url: '/v1/departmentWork/lecture/sliceAnnexFile/',
    method: 'post',
    timeout: 60000,
    data,
  })
}

export const MergeUploadFile = async (data) => {
  return request({
    url: '/v1/departmentWork/lecture/mergeAnnexFile/',
    method: 'post',
    timeout: 60000,
    data,
  })
}
